<?php defined('BASEPATH') or exit('No direct script access allowed');
//file nay se load nhung cai chung cho 1 module
class Base extends Public_Controller
{
	public $config_module;
	public $namespace;
	
	function __construct( $module ){
		$langfile = $module;
//		echo APPPATH.'modules/'.$module.'/language/'.$this->lang_current.'/'.$langfile;
		//print_r($this->load->get_package_paths(TRUE));
		//foreach ($this->load->get_package_paths(TRUE) as $package_path)
		//{
			if (file_exists(APPPATH.'modules/'.$module.'/language/'.$this->lang_current.'/'.$langfile.'_lang.php'))
			{
				$this->load->language($langfile,$this->lang_current);
			}
		//}
		$this->load->model('settings/settings_m');
		$this->config_module = $this->settings_m->get_config($module);
		$this->namespace = $module;
		//print_r($this->config_module);
	}
}